//
//  BaseController.h
//  Postre
//
//  Created by CoderLT on 2017/5/22.
//  Copyright © 2017年 CoderLT. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseNavigationController.h"

@interface BaseController : UIViewController
@property (nonatomic, assign) BOOL haveDidAppearFirst;
@property (nonatomic, assign) BOOL viewIsAppear;


- (void)showLeftNavTitle:(NSString *)title backItem:(BOOL)show;
/**
 设置返回按钮, 导航栏标题, 请统一使用方法
 - (void)showNavTitle:(NSString *)title backItem:(BOOL)show;
 - (void)setNavRightItemWithTitle:(NSString *)title action:(SEL)action;
 */

#pragma mark - 屏幕旋转实现
+ (UIStatusBarStyle)preferredStatusBarStyle;
+ (BOOL)prefersStatusBarHidden;
+ (UIStatusBarAnimation)preferredStatusBarUpdateAnimation;
+ (BOOL)shouldAutorotate;
+ (UIInterfaceOrientationMask)supportedInterfaceOrientations;
+ (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation;

#define ATAutoRotateImplementation \
- (UIStatusBarStyle)preferredStatusBarStyle { \
    return [BaseController preferredStatusBarStyle];\
}\
- (BOOL)prefersStatusBarHidden {\
    return [BaseController prefersStatusBarHidden];\
}\
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {\
    return [BaseController preferredStatusBarUpdateAnimation];\
}\
- (BOOL)shouldAutorotate {\
    return [BaseController shouldAutorotate];\
}\
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {\
    return [BaseController supportedInterfaceOrientations];\
}\
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {\
    return [BaseController preferredInterfaceOrientationForPresentation];\
}
@end
